import { ipcMain } from "electron";
import SubWindow from "../windows/SubWindow";
import { winConfig } from "../windows/configs";

  // IPC test
ipcMain.on('ping', (_,data) => console.log(JSON.stringify(data)))


// 监听启动新项目
ipcMain.on('start-sub-window', (_,{appKey}:{appKey:string}) => {
    const config = winConfig[appKey];
    // 启动新窗口
    SubWindow.createWindow(config);
})